<?php
namespace Common\Models;
use Common\BaseModel;
class WAPlatform extends BaseModel
{
    public $res;
    public $expire;
    public function initialize()
    {
        parent::initialize();
        $this->setSource('w_a_platform');
    }


    /**
     * 获取用户下单的服务商和渠道
     * @param int $user_id
     * @return array
     */
    public function getGroupList()
    {
        //平台的分佣配置
        $getList = $this->find()->toarray();
        $result = [];
        foreach ($getList as $key => $value) {
            $result[$value['platform']] = $value;
        }
        return $result;
    }


}
